# 基础镜像
FROM ubuntu:18.04

# 镜像创建者
MAINTAINER ubuntu-python36 Docker image "enovo458@126.com" author "drophair"

# 镜像更换国内镜像源(清华源)

RUN apt-get update
RUN apt-get install -y wget
RUN sed -i "s/ports.ubuntu.com/repo.huaweicloud.com/g" /etc/apt/sources.list
RUN apt-get clean
RUN apt-get update
RUN apt-get install
RUN apt-get update --fix-missing
RUN apt-get autoremove && apt-get clean && apt-get install -f

# 安装python36-dev
RUN apt install -y libevent-dev libjpeg-dev build-essential libssl-dev libffi-dev python3-dev libavahi-compat-libdnssd-dev libatlas-base-dev autoconf python3-venv && \
cd /root && \
wget https://ghproxy.com/github.com/pypa/get-pip/raw/main/public/get-pip.py && \
cd /root && \
python3 get-pip.py -i http://pypi.douban.com/simple --trusted-host pypi.douban.com && \
python3 get-pip.py -i http://pypi.douban.com/simple --trusted-host pypi.douban.com && \
pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple && \
pip3 install homeassistant -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
# hass --open-ui
